package com.xiweicheng.test.springboot.mutil.ds.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.xiweicheng.test.springboot.mutil.ds.mapper.UserMapper;
import com.xiweicheng.test.springboot.mutil.ds.model.User;

@Service
public class UserServiceImpl implements UserService {

    @Autowired
    private UserMapper userMapper;

    @Transactional(value = "mybatisTransactionManager")
    @Override
    public int addUser(User user) {

        return userMapper.insertSelective(user);
    }

}
